home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Telnet 2.6.1d1 4⁄26⁄94 Folder / source / vs / vsdata.h < prev    next >
Text File  |  1993-10-29  |  4KB  |  110 lines

  1. /*
  2.  *      Virtual Screen Kernel Data/Structure Definitions
  3.  *                          (vsdata.h)
  4.  *  
  5.  *    National Center for Supercomputing Applications
  6.  *      by Gaige B. Paulsen
  7.  *
  8.  *    This file contains the control and interface calls for the NCSA
  9.  *  Virtual Screen Kernel.
  10.  *
  11.  *      Version Date    Notes
  12.  *      ------- ------  ---------------------------------------------------
  13.  *      0.01    861102  Initial coding -GBP
  14.  *        2.1        871130    NCSA Telnet 2.1 -GBP
  15.  *        2.2     880715    NCSA Telnet 2.2 -GBP
  16.  *
  17.  */
  18.  
  19. #ifndef    __VSDATA__
  20. #define __VSDATA__
  21.  
  22. #define MAXWID 132      /* The absolute maximum number of chars/line */
  23.  
  24. struct VSline
  25.   {
  26.     struct VSline
  27.       /* doubly-linked list of lines */
  28.         *next,          /* Pointer to next line */
  29.         *prev;          /* Pointer to previous line */
  30.     char                  /* Text for the line -- may be part of a block */
  31.         *text;          /* of memory containing more than one line */
  32.     short                /* flag for memory allocation coordination */
  33.         mem;            /* nonzero for first line in memory block */
  34.   };
  35.  
  36. typedef struct VSline
  37.     VSline;
  38. typedef VSline
  39.     *VSlinePtr;
  40. typedef VSlinePtr
  41.     *VSlineArray;
  42.  
  43. #define maxparms 16
  44.  
  45. struct VSscrn {
  46.     OSType    id;                // VSCR
  47.     VSlinePtr
  48.          scrntop,           /* topmost line of the current screen (= linest[0]) */
  49.          buftop,            /* top (i e oldest line) of scrollback buffer     */
  50.          vistop;            /* topmost line within visible region (may be in screen or scrollback area) */
  51.     VSlineArray
  52.         attrst,             /* pointer to array of screen attribute lines   */
  53.         linest;             /* pointer to array of screen text lines        */
  54.     short lines,                /* How many lines are in the screen arrays      */
  55.          maxlines,          /* maximum number of lines to save off top      */
  56.          numlines,          /* number of lines currently saved off top      */
  57.          allwidth,          /* allocated width of screen lines              */
  58.          maxwidth,          /* current screen width setting (<= allwidth)   */
  59.          savelines,         /* save lines off top? 0=no                     */
  60.           forcesave,            /* NCSA 2.5: always force lines to be saved off top */
  61.          ESscroll,            /* Scroll screen when ES received                */
  62.          attrib,            /* current character writing attributes         */
  63.          x,y,               /* current cursor positon                       */
  64.          Px,Py,Pattrib,     /* saved cursor position and writing attributes */
  65.          VSIDC,             /* Insert/delete character mode 0=draw line     */
  66.          DECAWM,            /* Auto Wrap Mode 0=off                         */
  67.          DECCKM,            /* Cursor Key Mode                              */
  68.          DECPAM,            /* keyPad Application Mode                        */
  69.          DECORG,            /* origin mode                                  */
  70.          G0,G1,                /* Character set identifiers                     */
  71.          charset,            /* Character set mode                             */
  72.          IRM,               /* Insert/Replace Mode                          */
  73.          escflg,            /* Current Escape level                            */
  74.          top, bottom,       /* Vertical bounds of scrolling region             */
  75.          Rtop,Rbottom,        /* Vertical bounds of visible region             */
  76.          Rleft,Rright,        /* Horizontal bounds of visible region             */
  77.          parmptr,           /* LU - index of current parm                     */
  78.          prredirect;        /* LU - printer redirection or not                */
  79.     long prbuf;                /* LU - last four chars                            */
  80.    short refNum;            /* LU - temporary file for printer redirection    */
  81.     char fname[40];            /* LU - file name for temporary file            */
  82.     short parms[maxparms];   /* Ansi Parameters                             */
  83.     char *tabs;             /* pointer to array for tab settings             */
  84.                             /* contains 'x' at each tab position, blanks elsewhere */
  85.     };
  86.  
  87. typedef struct VSscrn VSscrn;
  88.  
  89. struct VSscrndata {
  90.     VSscrn *loc;            /* Location of the Screen record for this scrn */
  91.     short
  92.         captureRN,    /* capture file's RefNum                       */    /* BYU 2.4.18 */
  93.         stat;        /* status of this screen (0=Uninitialized,     */    /* BYU 2.4.18 */
  94.                     /*                        1=In Use             */    /* BYU 2.4.18 */
  95.                     /*                        2=Inited, but not IU */    /* BYU 2.4.18 */
  96.     };
  97.  
  98. typedef struct VSscrndata VSscrndata;
  99.  
  100. #ifdef VSMASTER
  101. VSscrn  *VSIw;
  102. short      VSIwn;
  103. #else
  104. extern VSscrn   *VSIw;
  105. extern short       VSIwn;
  106. #endif
  107.  
  108. #define    VSPBOTTOM    (VSIw->lines)
  109.  
  110. #endif    // __VSDATA__